#ifndef _USER_DEV_SPI_H_
#define _USER_DEV_SPI_H_
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"

#define PIN_NUM_MISO -1
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK 18
#define PIN_NUM_CS 5
#define LCD_DC GPIO_NUM_21

typedef enum
{
    SPI_WRITE_NONE,
    SPI_WRITE_REG,
    SPI_WRITE_DATA,
    SPI_WRITE_DATA_OVER,
} SPI_WRITE_MODE_t;

void vspi_init(void);
void VSPI_data_queue(uint16_t *dat, uint32_t len, SPI_WRITE_MODE_t user_fg);
void VSPI_data_queue_8bit(uint8_t val, SPI_WRITE_MODE_t dc_state);
void VSPI_data_queue_REG_8bit(uint8_t reg);
void VSPI_data_queue_data_8bit(uint8_t data);
void VSPI_data_queue_data_32bit(uint8_t data1, uint8_t data2,
                                uint8_t data3, uint8_t data4);

#endif
